<!DOCTYPE html>
<body>
<script src="../resources/js-test.js"></script>
<script>
    if (window.gamepadController)
    {
        // check some out of range values.
        for (var i = -100; i < 100; ++i)
        {
            gamepadController.connect(i);
            gamepadController.setId(i, "name");
            for (var j = -100; i < 100; ++i)
            {
                gamepadController.setButtonCount(i, j);
                gamepadController.setAxisCount(i, j);
                gamepadController.setButtonData(i, j, 0.0);
                gamepadController.setAxisData(i, j, 0.0);
            }
            gamepadController.disconnect(i);
        }
    }
    else
    {
        console.log("FAIL: no gamepadController available.")
    }
</script>
<p>Range checks; just shouldn't crash.</p>
</body>
